import request from '@/utils/request'

// 查询电桩列表
export function listCharge(query) {
  return request({
    url: '/equipment/consume/list',
    method: 'get',
    params: query
  })
}

// 查询电桩详细
export function getCharge(id) {
  return request({
    url: '/equipment/consume/' + id,
    method: 'get'
  })
}

// 新增电桩
export function addCharge(data) {
  return request({
    url: '/equipment/consume',
    method: 'post',
    data: data
  })
}

// 修改电桩
export function updateCharge(data) {
  return request({
    url: '/equipment/consume',
    method: 'put',
    data: data
  })
}

// 删除电桩
export function delCharge(data) {
  return request({
    url: '/equipment/consume',
    method: 'delete',
    data: data
  })
}
